<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    let arr = [
      1,23,1,251,3123,3,5,7,9
    ];

    //检测数组每个元素是否都为偶数
    // let result = arr.every(item => {
    //   //如果 item 元素满足条件, 则返回 true
    //   if(item % 2 === 0){
    //     return true;
    //   }else{
    //     return false;
    //   }
    // });

    //检测是否都为奇数
    // let result = arr.every(item => item % 2 === 1);

    //检测数组中是否存在数字大于 3000 的值
    let result = arr.some(item => item > 3000);

    console.log(result);

  </script>
</body>
</html>